using System.Collections;
using System.Collections.Generic;
using System.IO;
using System.Text;
using UnityEngine;

public class PolicyPanel : MonoBehaviour
{
    string path;
    private void Awake()
    {
        path = Application.persistentDataPath + "/data";

        if (File.Exists(path + "/pl.b"))
        {
            gameObject.SetActive(false);
        }
    }

    public void AgreeButton()
    {
        if (!Directory.Exists(path))
        {
            Directory.CreateDirectory(path);
        }
        if (!File.Exists(path + "/pl.b"))
        {
            File.Create(path + "/pl.b");
        }
        gameObject.SetActive(false);

        GameManager.instance.InitGame();
    }

    public void DontAgreeButton()
    {
        Application.Quit();
    }
}
